# coding=utf-8
# encoding=utf-8

import urllib.request

# url='http://192.168.199.1:8000/mainsugar/loginGET/'
# textmod ={'user':'admin','password':'admin'}
# textmod = urllib.urlencode(textmod)
# print(textmod)
# 输出内容:password=admin&user=admin

def getxml():
    # http://172.20.12.104/ctrl.xml?utsxxx=1522827058550&u=4
    url = "http://" + "172.20.12.102" + "/ctrl.xml?"
    add = "u=1"
    req = urllib.request.Request(url=url+add)
    res = urllib.request.urlopen(req)
    res = res.read()
    print(res)
    return res
